<?php

class Category extends BaseEntity{
		
	function __construct($id = 0){
		$this->logicDelete = true;
		parent::__construct($id);
	}
	
	public function getAll($orderBy = '',$limit = 0,  $offset = 0, $count = false, $addAllCategory = false) {		
		$categories = array();
		if($addAllCategory){
			$categories[] = $this->createAllCategories();
		}		
		$categories = array_merge($categories, parent::getAll($orderBy, $limit, $offset, $count));		
		return $categories;
				
		
		return $categories;
	}
	
	public function createAllCategories(){		
		$category = new Category();
		$category->attributes->id = -1;
		$category->attributes->name = "Todas";
		
		return $category;
	}
	
}
?>